﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using ZLDC.Common.Estate;

namespace ZLDC.Estate.UM
{
    public partial class WorkReportList : _PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) 
            {
                AddDeptTree();
                try
                {
                    hdCurentUser.Value = _Utility.GetInfoBySession().m_sUserID;
                }
                catch 
                {
                   
                }
                   if (ZLDC.Common.BaseUser.UserInfo.GetPopedom("保存经理级意见"))
                {
                    hdReplyLimits.Value = "1";
                }
            }
        }
        /// <summary>
        /// 选择部门树形菜单
        /// </summary>
        private void AddDeptTree()
        {
            string sTopDept = string.Empty;//默认取表中第一行为最上层部门
            string sLimtDeptIdList;

            sLimtDeptIdList = string.Empty;//全部制            
            sTopDept = ConfigurationSettings.AppSettings["SalesDepartment"].ToString().Trim();//最上层部门

            ZLDC.Topo.BLL.Estate.DeptTree zdt = new ZLDC.Topo.BLL.Estate.DeptTree(sTopDept, sLimtDeptIdList);
            ltlDeptTree.Text = zdt.GetZlhqDept();
        }
    }
}
